home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / mintr151.zip / HTMSHORT.MT < prev    next >
Text File  |  1996-08-23  |  2KB  |  59 lines

  1. ; Using these substitutions for HTML codes will result in less typing
  2. ; I also find them easier to remember than straight HTML, (but then
  3. ;   I created them)
  4. ; The command line to use the strings in the file (will save output
  5. ;   HTML file with extension .htm) is: mt /i(htmshort.mt)x+b+(.htm) file(s)
  6.  
  7. ; \ (needs to be represented as \\) turns something on ~ turns it off
  8. ;
  9.  
  10. ; First line will be title of page
  11.     .{~0}[^\r\n]* = <HTML>\r\n<HEAD>\r\n<TITLE>\i</TITLE>\r\n</HEAD>\r\n<BODY>\r\n
  12. ; One or more blank line(s) will be converted to paragraph break
  13.     '\r\n'{2,}      = \r\n<P>\r\n
  14.     \\n             = <BR>          ; \n represents newline as in C
  15.     \\_             = <HR>
  16.  
  17. ; Font styles
  18.     \\b             = <B>
  19.     \~b              = </B>
  20.     \\i             = <I>
  21.     \~i              = </I>
  22.     \\t             = <TT>
  23.     \~t              = </TT>
  24.     \\\"            = <BLOCKQUOTE>
  25.     \~\"             = </BLOCKQUOTE>
  26. ; Headings will be represented by \[digit] Heading will continue until end of
  27. ;   line or \ encountered
  28.     \\\d[^\\\r\n]*   = <H\2>\3</H\2>
  29.  
  30. ; \** will start a unnumbered list, \* for each item, ~* to end
  31.      \\'**'            = <UL><LI>
  32.      \\'*'             = <LI>
  33.      \~'*'              = </UL>
  34. ; \## will start a numbered list, \# for each item, ~# to end
  35.      \\##            = <OL><LI>
  36.      \\#             = <LI>
  37.      \~#              = </OL>
  38. ; \g represents graphics, the word after the \g is the image name
  39.      \\g\s*\w+       = "<IMG SRC= \"\3\">"
  40. ; \l represents links, the word after the \l is the link name, the rest of the line
  41. ;  will be the link description unless a \ is encountered first
  42. ; is the link description
  43.     \\l\s*\S+[^\r\n\\]+ = "<A HREF= \"\3\"> \4 </A>"
  44. ; \@ is an email link - the email address will follow and be highlighted
  45.      \\@\s*\S+       = "<A HREF= \"mailto:\3\">\3</A>"
  46.  
  47. ; Convert to HTML escape characters
  48.     \>              = <
  49.     \<              = >
  50.     \&              = &
  51.     \"              = "
  52.  
  53. ; for literal \ and ~ precede with backslash
  54.     \\[\\~]         = \2
  55. ; Single \ can be used to end \l and headers, will be deleted
  56.     \\              = \z
  57. ; Finally do closing statements
  58.     .{0~} = </BODY>\r\n</HTML>\r\n
  59.